import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import cn.zou.blog.entry.Person;
import cn.zou.blog.service.TService;


public class TSrping {
	@Test
	public void TSpring(){
		ClassPathXmlApplicationContext applicationConetxt=new ClassPathXmlApplicationContext("application-context.xml");
		TService tService= (TService) applicationConetxt.getBean("tService");
		tService.say();
	}
	@Test
	public void TSpringAndMybatis(){
		ClassPathXmlApplicationContext applicationConetxt=new ClassPathXmlApplicationContext("application-context.xml");
		TService tService= (TService) applicationConetxt.getBean("tService");
		Person person=new Person();
		person.setAge(10);
		person.setName("测试人员1");
		tService.add(person);
	}
	@Test
	public void TSpringTransation(){
		ClassPathXmlApplicationContext applicationConetxt=new ClassPathXmlApplicationContext("application-context.xml");
		TService tService= (TService) applicationConetxt.getBean("tService");
		Person person=new Person();
		person.setAge(10);
		person.setName("测试人员2");
		tService.add(person);
	}
}
